
<form name="editForm" role="form" novalidate ng-submit="vm.save()">

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myBookLabel" data-translate="jhdemoApp.book.home.createOrEditLabel">Create or edit a Book</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.book.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.book.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhdemoApp.book.title" for="field_title">Title</label>
            <input type="text" class="form-control" name="title" id="field_title"
                    ng-model="vm.book.title"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhdemoApp.book.description" for="field_description">Description</label>
            <input type="text" class="form-control" name="description" id="field_description"
                    ng-model="vm.book.description"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhdemoApp.book.publicationDate" for="field_publicationDate">Publication Date</label>
                <div class="input-group">
                    <input id="field_publicationDate" type="text" class="form-control" name="publicationDate" uib-datepicker-popup="{{dateformat}}" ng-model="vm.book.publicationDate" is-open="vm.datePickerOpenStatus.publicationDate"
                    />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="vm.openCalendar('publicationDate')"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="jhdemoApp.book.price" for="field_price">Price</label>
            <input type="number" class="form-control" name="price" id="field_price"
                    ng-model="vm.book.price"
                     />
        </div>

        <div class="form-group">
            <label data-translate="jhdemoApp.book.bootAuthor" for="field_bootAuthor">Book Author</label>
            <select class="form-control" id="field_bootAuthor" name="bootAuthor" ng-model="vm.book.bootAuthor" ng-options="author as author.name for author in vm.authors track by author.id">
                <option value=""></option>
            </select>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
